package de.cbf.cam.dsa.facet.talent.act;

import de.cbf.cam.dsa.facet.talent.service.IServiceResolver_FacetTalent;
import de.cbf.cam.dsa.facet.talent.service.ServiceResolver_FacetTalent;
import de.cbf.cam.dsa.facet.talent.service.persister_interface.IServicePersister_FacetTalent;
import de.cbf.util.entity.facet.persistence.interfaces.IServPersister;
import de.cbf.util.entity.facet.persistence.resolver.IServiceResolverElement;
import de.cbf.util.entity.facet.persistence.resolver.act.AbstractActivatorResolverElement;
import de.cbf.util.entity.facet.persistence.resolver.act.AbstractActivatorResolverFacet;

/**
 * The activator class controls the plug-in life cycle
 */
public class ActivatorFacetTalent extends AbstractActivatorResolverFacet{

	// The plug-in ID
	public static final String PLUGIN_ID = "de.cbf.cam.dsa.facet.talent"; //$NON-NLS-1$

	// The shared instance
	private static ActivatorFacetTalent plugin;
	
	/**
	 * The constructor
	 */
	public ActivatorFacetTalent() {
	}

	
	/**
	 * Returns the shared instance
	 *
	 * @return the shared instance
	 */
	public static ActivatorFacetTalent getDefault() {
		return plugin;
	}
	
	@Override
	protected void setPluginInstance(AbstractActivatorResolverElement activatorFacet) {
		if (activatorFacet instanceof ActivatorFacetTalent) {
			ActivatorFacetTalent activatorFacetTalent = (ActivatorFacetTalent) activatorFacet;
			plugin = activatorFacetTalent;
		}		
	}


	@Override
	protected IServiceResolverElement createResolverService() {		
		return new ServiceResolver_FacetTalent();
	}


	@Override
	protected Class<? extends IServPersister> getServPersisterInterface() {		
		return IServicePersister_FacetTalent.class;
	}


	@Override
	protected String[] getServiceResolverInterfacesNames() {		
		return new String[]{IServiceResolver_FacetTalent.class.getName()};
	}

	@Override
	protected String getPlugin_ID() {		
		return PLUGIN_ID;
	}
	
}
